<?php
    session_start(); 
    if(!isset($_SESSION['utente'])){ 
        exit("Accesso negato"); 
   	}
    else {
		include 'connect.php';
		if (isset($_GET['sug_id']) && is_numeric($_GET['sug_id'])) {
			$id = $_GET['sug_id'];
			$result = mysql_query("DELETE FROM suggested WHERE sug_id=$id") or die(mysql_error());
			header("Location: ./../suggested.php");
		}
		else {
			header("Location: ./../suggested.php");
		}
	}
?>